![]() |
PBWriteAsync |
||||
Header: | Devices.h | Carbon status: | Modified | |
Writes any number of bytes to an open file.
OSErr PBWriteAsync ( ParmBlkPtr paramBlock );
A pointer to a basic File Manager parameter block.
A result code.
The relevant fields of the parameter block are:
On input, a pointer to a completion routine.
On output, the result code of the function.
On input, a file reference number for the open file to which to write.
On input, a pointer to a data buffer containing the bytes to write.
On input, the number of bytes requested.
On output, the number of bytes actually written.
On input, the positioning mode.
On input, the positioning offset. On output, the new position of the mark.
The PBWriteAsync function takes ioReqCount bytes from the buffer pointed to by ioBuffer and attempts to write them to the open file whose access path is specified by ioRefNum. The position of the mark is specified by ioPosMode and ioPosOffset. If the write operation completes successfully, PBWriteAsync moves the file mark to the byte following the last byte written and returns noErr.
If you try to write past the logical end-of-file, PBWriteAsync moves the logical end-of-file. If you try to write past the physical end-of-file, PBWriteAsync adds one or more clumps to the file and moves the physical end-of-file accordingly.
Modified in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
This function is only supported for writing to open files.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)